package cm.yc.springcloud.config;

import org.springframework.cloud.gateway.route.RouteLocator;
import org.springframework.cloud.gateway.route.builder.RouteLocatorBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author DELL
 * @Date 2024/10/11 1:42
 * @Version 1.0
 */
@Configuration
public class GateWayRoutesConfig {

	@Bean
	public RouteLocator myRouteLocator01(RouteLocatorBuilder routeLocatorBuilder) {

		RouteLocatorBuilder.Builder routes = routeLocatorBuilder.routes();
		RouteLocator member_route03 = routes.route("member_route03", r -> r.path("/member/get/1")
				.uri("http://localhost:10001"))
				.build();
		return member_route03;
	}
}
